import React from "react";
import { notFound } from "next/navigation";

import { isValidYearParam } from "@/lib/frontend/params";

export default async function YearLayout({ children, params }) {
	const { year } = await params;

	if (!isValidYearParam(year)) {
		notFound();
	}

	return children;
}
